3.189 \(\int \frac{a+b x^n}{c+d x^n} \, dx\)

Optimal. Leaf size=43 \[ \frac{b x}{d}-\frac{x (b c-a d) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{d x^n}{c}\right )}{c d} \]

[Out]

(b*x)/d - ((b*c - a*d)*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), -((d*x^n)/c)])
/(c*d)

_______________________________________________________________________________________

Rubi [A]  time = 0.0551257, antiderivative size = 43, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.118 \[ \frac{b x}{d}-\frac{x (b c-a d) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{d x^n}{c}\right )}{c d} \]

Antiderivative was successfully verified.

[In]  Int[(a + b*x^n)/(c + d*x^n),x]

[Out]

(b*x)/d - ((b*c - a*d)*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), -((d*x^n)/c)])
/(c*d)

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 7.20277, size = 31, normalized size = 0.72 \[ \frac{b x}{d} + \frac{x \left (a d - b c\right ){{}_{2}F_{1}\left (\begin{matrix} 1, \frac{1}{n} \\ 1 + \frac{1}{n} \end{matrix}\middle |{- \frac{d x^{n}}{c}} \right )}}{c d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((a+b*x**n)/(c+d*x**n),x)

[Out]

b*x/d + x*(a*d - b*c)*hyper((1, 1/n), (1 + 1/n,), -d*x**n/c)/(c*d)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0369414, size = 40, normalized size = 0.93 \[ \frac{x \left ((a d-b c) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{d x^n}{c}\right )+b c\right )}{c d} \]

Antiderivative was successfully verified.

[In]  Integrate[(a + b*x^n)/(c + d*x^n),x]

[Out]

(x*(b*c + (-(b*c) + a*d)*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), -((d*x^n)/c)])
)/(c*d)

_______________________________________________________________________________________

Maple [F]  time = 0.083, size = 0, normalized size = 0. \[ \int{\frac{a+b{x}^{n}}{c+d{x}^{n}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((a+b*x^n)/(c+d*x^n),x)

[Out]

int((a+b*x^n)/(c+d*x^n),x)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ -{\left (b c - a d\right )} \int \frac{1}{d^{2} x^{n} + c d}\,{d x} + \frac{b x}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)/(d*x^n + c),x, algorithm="maxima")

[Out]

-(b*c - a*d)*integrate(1/(d^2*x^n + c*d), x) + b*x/d

_______________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \[{\rm integral}\left (\frac{b x^{n} + a}{d x^{n} + c}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)/(d*x^n + c),x, algorithm="fricas")

[Out]

integral((b*x^n + a)/(d*x^n + c), x)

_______________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a+b*x**n)/(c+d*x**n),x)

[Out]

Exception raised: TypeError

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{b x^{n} + a}{d x^{n} + c}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)/(d*x^n + c),x, algorithm="giac")

[Out]

integrate((b*x^n + a)/(d*x^n + c), x)